﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace ClockInLearning.Tools
{
    public class ContextDic
    {
        private Dictionary<string, object> dic;
        public Guid Uid;

        public ContextDic()
        {
            this.dic = new Dictionary<string, object>();
            Uid = Guid.NewGuid();
        }

        public object Get(string name)
        {
            if (this.dic.ContainsKey(name))
            {
                return dic[name];
            }

            return null;

        }

        public void Set(string name, object value)
        {
            if (this.dic.ContainsKey(name))
            {
                dic[name] = value;
            }

            else
                this.dic.Add(name, value);
        }

    }
}
